<?
class view{
	var $html;
	function view(){}
	function init($file){
		$this->html=$file->getSubpart("###".$this->subpart."###");
		return $this->replaceLang();
	}
	function render(){
		$this->html=HTML::substituteAllMarker("",$this->html);
		return $this->html;
	}
	
	function replaceLang(){
		$xml=simplexml_load_file(XML_LANG);
		$xml = $xml->xpath('//languageKey[@index="'.LANG.'"]');
		if(is_array($xml)){
			foreach($xml[0]->children() as $label){
				$atts = $label->attributes();
				$this->html = HTML::substituteMarker( "###".$atts["index"]."###", (string)$label, $this->html);
			}
		}
		return $this->html;
	}
}

?>